if theID < 96 or theID > 116 or "button" is not in the name of the target or the hilite of cd btn "label above command" is true
then exit mouseDown
put lineSelected(theID) into theLINEselected
if line theLINEselected of cd field "survey" is empty then exit mouseDown
If cd fld id 99 is not empty then
Set the hilite of cd btn id (item 1 of cd fld id 99) to false
End if
Put theID into cd fld id 99
put theLINEselected into item 2 of cd field id 99
Set the hilite of the target to true
End mouseDown
on mouseUp
if the optionKey is down then
put line 3 of cd field "action" into toDO
if toDO is in "Add,Insert,Replace,Edit,Delete,Label Above Command"
then domenu toDO
end if
put the short id of the target into theID
if the number of this cd is 1 then
if the mouse is down and (theID > 95 and theID < 117) and the hilite of cd btn "label above command" is false
then domenu "edit"
end if
end mouseUp
Function lineSelected btnID
return (trunc(((scroll of cd field "survey") + (item two of the loc of btn id btnID) - (item two of the rect of cd field "survey")) div the textheight of cd field "survey") + one)
end lineSelected
-- part 1 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=1 top=39 right=341 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 8192
-- line height: 15
-- part name: survey
----- HyperTalk script -----
on mouseWithin
put cd field "hilite btn" into btnID
if btnID ≠ "" then
set the hilite of cd btn id (item 1 of cd field "hilite btn") to false
end if
put "" into cd field "hilite btn"
pass mouseWithin
end mouseWithin
-- part 54 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=445 top=5 right=43 bottom=510
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: action
----- HyperTalk script -----
on mouseup
hide me
end mouseup
-- part 61 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=172 top=146 right=196 bottom=352
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 20
-- part name: wait
----- HyperTalk script -----
on mouseUp
hide me
end mouseUp
on mouseWithin
mouseUp
end mouseWithin
-- part 68 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=68 top=1 right=20 bottom=163
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Commands
----- HyperTalk script -----
on mouseDown
set the hilite of me to true
set cursor to arrow
put "Add,(Insert,(Replace,(Edit,(Delete,(-,Label Above Command" into CommandsMenu
if the hilite of cd btn "label above command" is false then
put "Add,Insert,Replace,Edit,Delete,(-,Label Above Command" into CommandsMenu
else
put "Add,(Insert,(Replace,(Edit,(Delete,(-,!‚áßLabel Above Command" into CommandsMenu
end if
put PopUpMenu (CommandsMenu,"",69,20) into theITEM
set the hilite of me to false
if theITEM = 0 then exit mouseDown
if char 1 of item theITEM of commandsMenu = "!" then
delete char 1 to 2 of item theITEM of commandsMenu
end if
put item theITEM of commandsMenu into line 3 of cd field "action"
domenu (item theITEM of CommandsMenu)
end mouseDown
-- part 63 (button)
-- low flags: 80
-- high flags: E005
-- rect: left=360 top=4 right=18 bottom=511
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 8192
-- line height: 16
-- part name: Label Above Command
----- HyperTalk script -----
on mouseUp
set cursor to watch
label_above
end mouseUp
-- part 67 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=1 top=1 right=20 bottom=67
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Editor
----- HyperTalk script -----
on mouseDown
set the hilite of me to true
set cursor to arrow
if the hilite of cd btn "label above command" is false then
put "About...,(-,New,Open...,(-,Save,Save As...,Revert,(-,Print...," & "Print Code...,(-,Show All Code,Show Code of a Line...,(-,Home" into EditorMenu
else
put "About...,(-,New,Open...,(-,Save,Save As...,Revert,(-,Print...," & "Print Code...,(-,Show All Code,(Show Code of a Line...,(-,Home" into EditorMenu